1. Field of the Invention
The present invention relates to a programmable sequence controller which, in accordance with a sequence program read out from a memory, tests operational states of external input elements such as limit switches so as to energize external output elements such as magnetic relays based upon the results of the tests.
2. Description of the Prior Art
Today, because of being versatile, highly reliable and miniature, sequence controllers of a stored program type have been used for control of machine tools. In such a type of the controllers, instructions of a stored program are successively read out, in accordance with which operational states of external input elements are tested so as to energize or deenergize designated external output elements based upon the result of such tests. While the whole of the stored instructions is read out one time, in other words, during one scan, the operational state of each input element is read only one time. Accordingly, even if the operational state of a certain input element were changed in the course of a scan, such change is not detected immediately, and a considerable time delay occurs until the detection of the state change. Moreover, this time delay varies at every scan cycle since the operational state of the input element changes completely independently of the progress of the scan cycle. The time delay reaches at most the time that is taken to execute one scan of the stored program. For example, in the case where a 4000-word sequence program is executed by a sequence controller which operates at a processing speed of 10 .mu.s per word, the time delay ranges from 0 to 40 ms. The time delay of this range does not raise any inconvenience in executing a conventional sequence control, but raises some inconvenience in controlling the position of a spindle unit based upon a signal from a limit switch. For example, in positioning a spindle unit that is fed at a speed of 6 mm/min., the positioning error reaches at most 4 mm.
In order to solve the above noted defect, there has heretofore been suggested a programmable sequence controller whose output circuit 11, as shown in FIG. 1, is provided with an inhibition gate 12, which, upon receipt of a signal supplied from an external input element LS10 to a terminal 13, does not pass a program-issued energization command so as to directly deenergize an external output element M connected to an output converting circuit 14 based upon the signal. If such an output circuit 11 is applied to a controlled object which must be controlled immediately in response to a signal from a detector, such as the input element LS10, any inconvenience caused by response delay would be avoided. In the prior controller, however, since the operational state of the input element LS10 is not communicated to the operation control device 10, it is impossible to reset the latch circuit 15 in accordance with the sequence program after the input element LS10 is actuated. This not only causes the output element M to be subsequently energized in response to reopening of the input element LS10, but also brings about an noncoincidence between the operational state of the output element M and the content of the latch circuit 15. Accordingly, unless an external cable is used to inform the operation control device 10 of the operational state of the output element M, the sequence controller cannot perform correct sequence control. Additionally, since the restart of a slide member from a certain stop position is often necessary in an ordinary positioning control, there is encountered the need for reenergizing of the output element M by inhibiting passage of the signal from the input element LS10. In the prior controller, however, once the input element is closed, it is impossible to energize the output element in accordance with the sequence program, and such control cannot be carried out without the provision of an external auxiliary relay that inhibits the passage of the signal from the input element LS10.